import axios from 'axios';
export function request(config) {
    const instance = axios.create({
        baseURL: 'http://localhost:3000',
        timeout: 5000
    })
    instance.interceptors.request.use(res=>{
        return res
    },err=>{
        console.log(err);
    })
    instance.interceptors.response.use(res=>{
        return res
    },err => {
        console.log(err);
    })
    instance.defaults.withCredentials= true;
    return instance(config)
}